<section class="content-header">
    <ol class="breadcrumb">
        <li><a href="/dashboard"><i class="fa fa-dashboard"></i> 管理中心</a></li>
        <li class="active">用户管理</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">用户列表</h3>
                </div>
                <div class="box-body">
                    <table class="table table-striped table-hover">
                        <tr>
                            <th>

                            </th>
                            <th>
                                用户名
                            </th>
                            <th>
                                邮箱
                            </th>
                            <th>
                                注册码
                            </th>
                            <th>加入时间</th>
                        </tr>
                        {{#each users}}
                            <tr>
                                <td width="60">
                                    <img src="{{gravatar email}}" class="img-circle" alt="">
                                </td>
                                <td>
                                    <a href="/u/{{username}}" title="查看当前用户下的所有文章" target="_blank">{{username}}</a>
                                    {{#equals status false}}
                                        <span class="text-danger small">已禁用</span>
                                    {{/equals}}
                                </td>
                                <td>
                                    <a href="mailto:{{email}}">{{email}}</a>
                                </td>
                                <td width="160">{{inviteCode}}</td>
                                <td width="150">
                                    {{#if status}}
                                        <a href="/admin/user/disabled/{{id}}/{{status}}" class="btn btn-danger btn-sm" data-toggle="confirm" data-message="确定要将此用户禁用吗?">禁用</a>
                                    {{else}}
                                        <a href="/admin/user/disabled/{{id}}/{{status}}" class="btn btn-primary btn-sm" >启用</a>
                                    {{/if}}
                                </td>
                                <td>
                                    {{timeFromNow created_at}}
                                </td>
                            </tr>
                        {{/each}}
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
